//
//  WQAnimationTool.h
//  WQTransitionAnimationTool
//
//  Created by Xiang on 2021/5/12.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

/**转场动画类型**/
typedef NS_ENUM(NSUInteger , WQAnimationType) {
    /**淡入淡出**/
    WQAnimationTypeFade = 0,
    /**推挤**/
    WQAnimationTypePush,
    /**揭开**/
    WQAnimationTypeReveal,
    /**覆盖**/
    WQAnimationTypeMoveIn,
    /**立方体**/
    WQAnimationTypeCube,
    /**吮吸效果 该效果没有方向**/
    WQAnimationTypeSuckEffect,
    /** 翻转**/
    WQAnimationTypeOglFlip,
    /**波纹 该效果没有方向**/
    WQAnimationTypeRippleEffect,
    /**翻页**/
    WYAnimationTypePageCurl,
    /**反翻页**/
    WQAnimationTypePageUnCurl,
    /**开镜头  该效果没有方向**/
    WQAnimationTypeCameraIrisHollowOpen,
    /**关镜头  该效果没有方向**/
    WQAnimationTypeCameraIrisHollowClose,
    /**下翻页 设置之后方向要设置为WQTransitionDirectionNone 否则没效果**/
    WQAnimationTypeCurlDown,
    /**上翻页 设置之后方向要设置为WQTransitionDirectionNone 否则没效果**/
    WQAnimationTypeCurlUp,
    /**左翻转 设置之后方向要设置为WQTransitionDirectionNone 否则没效果**/
    WQAnimationTypeFlipFromLeft,
    /**右翻转 设置之后方向要设置为WQTransitionDirectionNone 否则没效果**/
    WQAnimationTypeFlipFromRight,
};

/**转场方向**/
typedef NS_ENUM(NSUInteger , WQTransitionDirection) {
    WQTransitionDirectionNone = 0,
    WQTransitionDirectionBottom,
    WQTransitionDirectionLeft,
    WQTransitionDirectionRight,
    WQTransitionDirectionTop
};


@interface WQAnimationTool : NSObject

/**
 *  自定义转场动画 一个控制器跳转到另一个控制器
 *
 *  @param type                动画类型
 *  @param transitionDirection 转场方向
 *  @param duration            转场时间
 *  @param fromViewController  fromVc
 *  @param toViewController    toVc
 *  @param completion          present完成之后的回调
 */
+ (void)presentViewControllerWithAnimationType:(WQAnimationType)type
                           transitionDirection:(WQTransitionDirection)transitionDirection
                                      duration:(NSTimeInterval)duration
                                        fromVC:(UIViewController *)fromViewController
                                          toVC:(UIViewController *)toViewController
                                    completion:(void (^)(void))completion;


@end

NS_ASSUME_NONNULL_END
